/**
 * @Time    : 2022/03/09 15:19
 * @Author  : WanRongJia
 * @License : Software business license
 * @Site    : www.linshensjl.top
 * @File    : insert.js
 * @Software: Rich Web Platform
 * @Function: 新增ID锁
 * @Version : 1.0
 **/
const { matchedData } = require("express-validator");
const { insertID } = require("./helpers/insertID");
const { buildResponse } = require("../../../utils/buildResponse");
const insert = async function (req, res) {
	try {
		req = matchedData(req);
		let ids = await insertID(req);
		res.json(buildResponse(ids, "新增成功", true));
	} catch (e) {
		res.json(e);
	}
};

module.exports = { insert };
